package javax.core.storage.entity;

import java.io.Serializable;
import java.sql.Date;

/**
 * @bucket 可以是http的host，也可以是本地路径前缀，必须以"/"结尾
 * filePath 文件的相对路径，代表文件夹路径，必须以"/"结尾
 * fileName 保存的文件名
 * 文件的访问路径为 bucket + filePath + fileName
 */
public class FileStorageDO implements Serializable {
	private static final long serialVersionUID = -4457643686400349301L;
    /** 文件的唯一数字ID，推荐使用雪花算法生成 */
	private Long id;
    /** 存储空间名称, 如是本地存储也代表一个目录的前缀 */
    private String bucket;
    /** 文件相对路径 **/
	private String filePath;
	/** 文件名称，不能有文件名不合法字符 */
	private String fileName;
    /** 可访问范围 0-公开，所有人可访问， 1-私有，只能创建者访问， 2-组用户可访问 */
	private int scope;
	/** 该文件所在的分组 */
	private String group;
	/** 平台租户ID */
	private Integer compId;

	private Long createUserId;
	private Long createUserName;
	private Date createTime;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getBucket() {
        return bucket;
    }

    public void setBucket(String bucket) {
        this.bucket = bucket;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public int getScope() {
        return scope;
    }

    public void setScope(int scope) {
        this.scope = scope;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public Integer getCompId() {
        return compId;
    }

    public void setCompId(Integer compId) {
        this.compId = compId;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(Long createUserName) {
        this.createUserName = createUserName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
